package cn.pping.org.domain;

import cn.pping.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    // 员工id
    private Long manager_id;
    // 员工ID对应的员工对象
    private Employee manager;
    // 上级部门id
    private Long parent_id;
    // 父级部门对应的id
    private Department parent;
    // 父级部门对应id的所有子员工
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    public List<Department> children = new ArrayList<>();
}
